<div class="np-tag-container">
    <input type="hidden"
           {foreach $data.attrs as $key => $attr}
    {$key}="{$attr}"
    {/foreach}
    >
    {assign name="$data.attrs.value" value=":empty($data.attrs.value) ? [] : explode(',', $data.attrs.value)"}

    <div class="layui-btn-container tag" lay-filter="{$data.field}" lay-newTag="true" lay-allowClose="true">
        {foreach $data.attrs.value as $tag}
        <button  type="button" class="tag-item">{$tag}</button>
        {/foreach}
    </div>
</div>